window.onload = function () {
    var bossImg = document.getElementsByClassName('boss-img');
    var companyImg = document.getElementsByClassName('company-img');











    var bxWrap = document.getElementsByClassName('bx-wrapper')[0];
    var uls = bxWrap.getElementsByTagName('ul');
    var left = document.getElementsByClassName('left')[0];
    var right = document.getElementsByClassName('right')[0];

    var speed = -984; 

    var closeTimer = null; 
console.log(bxWrap);
    bxWrap.style.width=uls[0].offsetWidth*uls.length+"px";
     
    function imgshow(){
        console.log(1)
    if (bxWrap.offsetLeft<-bxWrap.offsetWidth/2) {
        bxWrap.style.marginLeft='0';
    };

    if (bxWrap.offsetLeft>0) {
        bxWrap.style['margin-left']=-bxWrap.offsetWidth/2+'px';
    }

  bxWrap.style.left=bxWrap.offsetLeft+speed+'px';
    }
    
    closeTimer=setInterval(imgshow,2000);
    

    left.onclick = function() {
        bxWrap.marginLeft = '-984px';
        // bxWrap.style.transition = 'all inherit 10s'
    }
}